3.1.11 \(\int \sec ^7(c+d x) (a+i a \tan (c+d x)) \, dx\) [11]

Optimal. Leaf size=98 \[ \frac {5 a \tanh ^{-1}(\sin (c+d x))}{16 d}+\frac {i a \sec ^7(c+d x)}{7 d}+\frac {5 a \sec (c+d x) \tan (c+d x)}{16 d}+\frac {5 a \sec ^3(c+d x) \tan (c+d x)}{24 d}+\frac {a \sec ^5(c+d x) \tan (c+d x)}{6 d} \]

[Out]

5/16*a*arctanh(sin(d*x+c))/d+1/7*I*a*sec(d*x+c)^7/d+5/16*a*sec(d*x+c)*tan(d*x+c)/d+5/24*a*sec(d*x+c)^3*tan(d*x
+c)/d+1/6*a*sec(d*x+c)^5*tan(d*x+c)/d

________________________________________________________________________________________

Rubi [A]
time = 0.05, antiderivative size = 98, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 3, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {3567, 3853, 3855} \begin {gather*} \frac {i a \sec ^7(c+d x)}{7 d}+\frac {5 a \tanh ^{-1}(\sin (c+d x))}{16 d}+\frac {a \tan (c+d x) \sec ^5(c+d x)}{6 d}+\frac {5 a \tan (c+d x) \sec ^3(c+d x)}{24 d}+\frac {5 a \tan (c+d x) \sec (c+d x)}{16 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]^7*(a + I*a*Tan[c + d*x]),x]

[Out]

(5*a*ArcTanh[Sin[c + d*x]])/(16*d) + ((I/7)*a*Sec[c + d*x]^7)/d + (5*a*Sec[c + d*x]*Tan[c + d*x])/(16*d) + (5*
a*Sec[c + d*x]^3*Tan[c + d*x])/(24*d) + (a*Sec[c + d*x]^5*Tan[c + d*x])/(6*d)

Rule 3567

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[b*((d*Sec[
e + f*x])^m/(f*m)), x] + Dist[a, Int[(d*Sec[e + f*x])^m, x], x] /; FreeQ[{a, b, d, e, f, m}, x] && (IntegerQ[2
*m] || NeQ[a^2 + b^2, 0])

Rule 3853

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d*x]*((b*Csc[c + d*x])^(n - 1)/(d*(n
- 1))), x] + Dist[b^2*((n - 2)/(n - 1)), Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n,
 1] && IntegerQ[2*n]

Rule 3855

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin {align*} \int \sec ^7(c+d x) (a+i a \tan (c+d x)) \, dx &=\frac {i a \sec ^7(c+d x)}{7 d}+a \int \sec ^7(c+d x) \, dx\\ &=\frac {i a \sec ^7(c+d x)}{7 d}+\frac {a \sec ^5(c+d x) \tan (c+d x)}{6 d}+\frac {1}{6} (5 a) \int \sec ^5(c+d x) \, dx\\ &=\frac {i a \sec ^7(c+d x)}{7 d}+\frac {5 a \sec ^3(c+d x) \tan (c+d x)}{24 d}+\frac {a \sec ^5(c+d x) \tan (c+d x)}{6 d}+\frac {1}{8} (5 a) \int \sec ^3(c+d x) \, dx\\ &=\frac {i a \sec ^7(c+d x)}{7 d}+\frac {5 a \sec (c+d x) \tan (c+d x)}{16 d}+\frac {5 a \sec ^3(c+d x) \tan (c+d x)}{24 d}+\frac {a \sec ^5(c+d x) \tan (c+d x)}{6 d}+\frac {1}{16} (5 a) \int \sec (c+d x) \, dx\\ &=\frac {5 a \tanh ^{-1}(\sin (c+d x))}{16 d}+\frac {i a \sec ^7(c+d x)}{7 d}+\frac {5 a \sec (c+d x) \tan (c+d x)}{16 d}+\frac {5 a \sec ^3(c+d x) \tan (c+d x)}{24 d}+\frac {a \sec ^5(c+d x) \tan (c+d x)}{6 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.36, size = 61, normalized size = 0.62 \begin {gather*} \frac {a \left (3360 \tanh ^{-1}(\sin (c+d x))+\sec ^7(c+d x) (1536 i+1981 \sin (2 (c+d x))+700 \sin (4 (c+d x))+105 \sin (6 (c+d x)))\right )}{10752 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]^7*(a + I*a*Tan[c + d*x]),x]

[Out]

(a*(3360*ArcTanh[Sin[c + d*x]] + Sec[c + d*x]^7*(1536*I + 1981*Sin[2*(c + d*x)] + 700*Sin[4*(c + d*x)] + 105*S
in[6*(c + d*x)])))/(10752*d)

________________________________________________________________________________________

Maple [A]
time = 0.27, size = 74, normalized size = 0.76

method result size
derivativedivides \(\frac {\frac {i a}{7 \cos \left (d x +c \right )^{7}}+a \left (-\left (-\frac {\left (\sec ^{5}\left (d x +c \right )\right )}{6}-\frac {5 \left (\sec ^{3}\left (d x +c \right )\right )}{24}-\frac {5 \sec \left (d x +c \right )}{16}\right ) \tan \left (d x +c \right )+\frac {5 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{16}\right )}{d}\) \(74\)
default \(\frac {\frac {i a}{7 \cos \left (d x +c \right )^{7}}+a \left (-\left (-\frac {\left (\sec ^{5}\left (d x +c \right )\right )}{6}-\frac {5 \left (\sec ^{3}\left (d x +c \right )\right )}{24}-\frac {5 \sec \left (d x +c \right )}{16}\right ) \tan \left (d x +c \right )+\frac {5 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{16}\right )}{d}\) \(74\)
risch \(-\frac {i a \left (105 \,{\mathrm e}^{13 i \left (d x +c \right )}+700 \,{\mathrm e}^{11 i \left (d x +c \right )}+1981 \,{\mathrm e}^{9 i \left (d x +c \right )}-3072 \,{\mathrm e}^{7 i \left (d x +c \right )}-1981 \,{\mathrm e}^{5 i \left (d x +c \right )}-700 \,{\mathrm e}^{3 i \left (d x +c \right )}-105 \,{\mathrm e}^{i \left (d x +c \right )}\right )}{168 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{7}}-\frac {5 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{16 d}+\frac {5 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{16 d}\) \(138\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^7*(a+I*a*tan(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

1/d*(1/7*I*a/cos(d*x+c)^7+a*(-(-1/6*sec(d*x+c)^5-5/24*sec(d*x+c)^3-5/16*sec(d*x+c))*tan(d*x+c)+5/16*ln(sec(d*x
+c)+tan(d*x+c))))

________________________________________________________________________________________

Maxima [A]
time = 0.29, size = 106, normalized size = 1.08 \begin {gather*} -\frac {7 \, a {\left (\frac {2 \, {\left (15 \, \sin \left (d x + c\right )^{5} - 40 \, \sin \left (d x + c\right )^{3} + 33 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{6} - 3 \, \sin \left (d x + c\right )^{4} + 3 \, \sin \left (d x + c\right )^{2} - 1} - 15 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 15 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - \frac {96 i \, a}{\cos \left (d x + c\right )^{7}}}{672 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^7*(a+I*a*tan(d*x+c)),x, algorithm="maxima")

[Out]

-1/672*(7*a*(2*(15*sin(d*x + c)^5 - 40*sin(d*x + c)^3 + 33*sin(d*x + c))/(sin(d*x + c)^6 - 3*sin(d*x + c)^4 +
3*sin(d*x + c)^2 - 1) - 15*log(sin(d*x + c) + 1) + 15*log(sin(d*x + c) - 1)) - 96*I*a/cos(d*x + c)^7)/d

________________________________________________________________________________________

Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 372 vs. \(2 (86) = 172\).
time = 0.39, size = 372, normalized size = 3.80 \begin {gather*} \frac {-210 i \, a e^{\left (13 i \, d x + 13 i \, c\right )} - 1400 i \, a e^{\left (11 i \, d x + 11 i \, c\right )} - 3962 i \, a e^{\left (9 i \, d x + 9 i \, c\right )} + 6144 i \, a e^{\left (7 i \, d x + 7 i \, c\right )} + 3962 i \, a e^{\left (5 i \, d x + 5 i \, c\right )} + 1400 i \, a e^{\left (3 i \, d x + 3 i \, c\right )} + 210 i \, a e^{\left (i \, d x + i \, c\right )} + 105 \, {\left (a e^{\left (14 i \, d x + 14 i \, c\right )} + 7 \, a e^{\left (12 i \, d x + 12 i \, c\right )} + 21 \, a e^{\left (10 i \, d x + 10 i \, c\right )} + 35 \, a e^{\left (8 i \, d x + 8 i \, c\right )} + 35 \, a e^{\left (6 i \, d x + 6 i \, c\right )} + 21 \, a e^{\left (4 i \, d x + 4 i \, c\right )} + 7 \, a e^{\left (2 i \, d x + 2 i \, c\right )} + a\right )} \log \left (e^{\left (i \, d x + i \, c\right )} + i\right ) - 105 \, {\left (a e^{\left (14 i \, d x + 14 i \, c\right )} + 7 \, a e^{\left (12 i \, d x + 12 i \, c\right )} + 21 \, a e^{\left (10 i \, d x + 10 i \, c\right )} + 35 \, a e^{\left (8 i \, d x + 8 i \, c\right )} + 35 \, a e^{\left (6 i \, d x + 6 i \, c\right )} + 21 \, a e^{\left (4 i \, d x + 4 i \, c\right )} + 7 \, a e^{\left (2 i \, d x + 2 i \, c\right )} + a\right )} \log \left (e^{\left (i \, d x + i \, c\right )} - i\right )}{336 \, {\left (d e^{\left (14 i \, d x + 14 i \, c\right )} + 7 \, d e^{\left (12 i \, d x + 12 i \, c\right )} + 21 \, d e^{\left (10 i \, d x + 10 i \, c\right )} + 35 \, d e^{\left (8 i \, d x + 8 i \, c\right )} + 35 \, d e^{\left (6 i \, d x + 6 i \, c\right )} + 21 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 7 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^7*(a+I*a*tan(d*x+c)),x, algorithm="fricas")

[Out]

1/336*(-210*I*a*e^(13*I*d*x + 13*I*c) - 1400*I*a*e^(11*I*d*x + 11*I*c) - 3962*I*a*e^(9*I*d*x + 9*I*c) + 6144*I
*a*e^(7*I*d*x + 7*I*c) + 3962*I*a*e^(5*I*d*x + 5*I*c) + 1400*I*a*e^(3*I*d*x + 3*I*c) + 210*I*a*e^(I*d*x + I*c)
 + 105*(a*e^(14*I*d*x + 14*I*c) + 7*a*e^(12*I*d*x + 12*I*c) + 21*a*e^(10*I*d*x + 10*I*c) + 35*a*e^(8*I*d*x + 8
*I*c) + 35*a*e^(6*I*d*x + 6*I*c) + 21*a*e^(4*I*d*x + 4*I*c) + 7*a*e^(2*I*d*x + 2*I*c) + a)*log(e^(I*d*x + I*c)
 + I) - 105*(a*e^(14*I*d*x + 14*I*c) + 7*a*e^(12*I*d*x + 12*I*c) + 21*a*e^(10*I*d*x + 10*I*c) + 35*a*e^(8*I*d*
x + 8*I*c) + 35*a*e^(6*I*d*x + 6*I*c) + 21*a*e^(4*I*d*x + 4*I*c) + 7*a*e^(2*I*d*x + 2*I*c) + a)*log(e^(I*d*x +
 I*c) - I))/(d*e^(14*I*d*x + 14*I*c) + 7*d*e^(12*I*d*x + 12*I*c) + 21*d*e^(10*I*d*x + 10*I*c) + 35*d*e^(8*I*d*
x + 8*I*c) + 35*d*e^(6*I*d*x + 6*I*c) + 21*d*e^(4*I*d*x + 4*I*c) + 7*d*e^(2*I*d*x + 2*I*c) + d)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} i a \left (\int \left (- i \sec ^{7}{\left (c + d x \right )}\right )\, dx + \int \tan {\left (c + d x \right )} \sec ^{7}{\left (c + d x \right )}\, dx\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**7*(a+I*a*tan(d*x+c)),x)

[Out]

I*a*(Integral(-I*sec(c + d*x)**7, x) + Integral(tan(c + d*x)*sec(c + d*x)**7, x))

________________________________________________________________________________________

Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 181 vs. \(2 (86) = 172\).
time = 0.54, size = 181, normalized size = 1.85 \begin {gather*} \frac {105 \, a \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right ) - 105 \, a \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right ) + \frac {2 \, {\left (231 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{13} - 336 i \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{12} - 196 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{11} + 595 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} - 1680 i \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{8} - 595 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 1008 i \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 196 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 231 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 48 i \, a\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{7}}}{336 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^7*(a+I*a*tan(d*x+c)),x, algorithm="giac")

[Out]

1/336*(105*a*log(tan(1/2*d*x + 1/2*c) + 1) - 105*a*log(tan(1/2*d*x + 1/2*c) - 1) + 2*(231*a*tan(1/2*d*x + 1/2*
c)^13 - 336*I*a*tan(1/2*d*x + 1/2*c)^12 - 196*a*tan(1/2*d*x + 1/2*c)^11 + 595*a*tan(1/2*d*x + 1/2*c)^9 - 1680*
I*a*tan(1/2*d*x + 1/2*c)^8 - 595*a*tan(1/2*d*x + 1/2*c)^5 - 1008*I*a*tan(1/2*d*x + 1/2*c)^4 + 196*a*tan(1/2*d*
x + 1/2*c)^3 - 231*a*tan(1/2*d*x + 1/2*c) - 48*I*a)/(tan(1/2*d*x + 1/2*c)^2 - 1)^7)/d

________________________________________________________________________________________

Mupad [B]
time = 7.37, size = 247, normalized size = 2.52 \begin {gather*} \frac {5\,a\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{8\,d}-\frac {-\frac {11\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{13}}{8}+2{}\mathrm {i}\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}+\frac {7\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}}{6}-\frac {85\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9}{24}+10{}\mathrm {i}\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+\frac {85\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{24}+6{}\mathrm {i}\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-\frac {7\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{6}+\frac {11\,a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{8}+\frac {a\,2{}\mathrm {i}}{7}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{14}-7\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}+21\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}-35\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+35\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-21\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+7\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + a*tan(c + d*x)*1i)/cos(c + d*x)^7,x)

[Out]

(5*a*atanh(tan(c/2 + (d*x)/2)))/(8*d) - ((a*2i)/7 + (11*a*tan(c/2 + (d*x)/2))/8 - (7*a*tan(c/2 + (d*x)/2)^3)/6
 + a*tan(c/2 + (d*x)/2)^4*6i + (85*a*tan(c/2 + (d*x)/2)^5)/24 + a*tan(c/2 + (d*x)/2)^8*10i - (85*a*tan(c/2 + (
d*x)/2)^9)/24 + (7*a*tan(c/2 + (d*x)/2)^11)/6 + a*tan(c/2 + (d*x)/2)^12*2i - (11*a*tan(c/2 + (d*x)/2)^13)/8)/(
d*(7*tan(c/2 + (d*x)/2)^2 - 21*tan(c/2 + (d*x)/2)^4 + 35*tan(c/2 + (d*x)/2)^6 - 35*tan(c/2 + (d*x)/2)^8 + 21*t
an(c/2 + (d*x)/2)^10 - 7*tan(c/2 + (d*x)/2)^12 + tan(c/2 + (d*x)/2)^14 - 1))

________________________________________________________________________________________